"""
字符替换
本题要求编写程序，将输入字符串中的大写英文字母按以下对应规则替换，其他字符不变。(提示：转换表用元组实现）
A-Z  B-Y C-X
"""

#输入
string = input()

#制定转换规则
rules_tuple = (('A','Z'),('B','Y'),('C','X'),('D','W'),('E','V'),('F','U'),('G','T'),('H','S')
               ,('I','R'),('J','Q'),('K','P'),('L','O'),('M','N'),('N','M'),('O','L')
               ,('P','K'),('Q','J'),('R','I'),('S','H'),('T','G'),('U','F'),('V','E'),('W','D')
               ,('X','C'),('Y','B'),('Z','A'))

#转换
new_string = ""
for ch in string:
    replaced = False
    for rule in rules_tuple:
        if rule[0] == ch:
            new_string += rule[1]
            replaced = True
            break
    if not replaced:
        new_string += ch

print(new_string,end='')


